/**********************************************************************
 *
 * This code is developed for the course Informatica Industrial II
 * of Universidad Carlos III de Madrid - 2012
 * Authors: Victor González-Pacheco, Alberto Valero-Gomez
 *
 * The code is licenced under the Common Creative License,
 * Attribution-ShareAlike 3.0
 *
 * You are free:
 *   - to Share - to copy, distribute and transmit the work
 *   - to Remix - to adapt the work
 *
 * Under the following conditions:
 *   - Attribution. You must attribute the work in the manner specified
 *     by the author or licensor (but not in any way that suggests that
 *     they endorse you or your use of the work).
 *   - Share Alike. If you alter, transform, or build upon this work,
 *     you may distribute the resulting work only under the same or
 *     similar license to this one.
 *
 * Any of the above conditions can be waived if you get permission
 * from the copyright holder.  Nothing in this license impairs or
 * restricts the author's moral rights.
 *
 * It is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 * PURPOSE.
 **********************************************************************/


#ifndef TCPSOCKETCLIENT__H
#define TCPSOCKETCLIENT__H



#include "TCPSocket.h"

/**
  * \brief TCP Socket Client Class
  * This class implements a TCP Socket Client using the paradigm os streams
  */
class TCPSocketClient{

public:
    /**
      * \brief Creates a TCPSocket and makes the connection
      * \param ip remote IP Address
      * \param remote port Port
      * \throw string if it cannot open or connect the socket
      * @return The created TCPSocket
      */
    static TCPSocket & create(string ip, int port) throw(char const *);

private:
    /**
      * \brief Default Constructor
      * Private to avoid instatation
      */
    TCPSocketClient();

};


#endif //TCPSOCKETCLIENT__H
